/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys ='zy';

  // add your middleware config here
  config.middleware = [];

  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
    security: {
      csrf: {
        // queryName: '_csrf', // 通过 query 传递 CSRF token 的默认字段为 _csrf
        // bodyName: '_csrf', // 通过 body 传递 CSRF token 的默认字段为 _csrf
        enable: false
      },
    },
    cors: {
      origin: "*"
    },
    mysql: {
      client: {
        // host
        host: 'localhost',
        // port
        port: '3306',
        // username
        user: 'root',
        // password
        password: '20030119',
        // database
        database: 'timelist',
      },
    }
  };
    return {
      ...config,
      ...userConfig,
    };
  };
